package javaDemo01;

public class laptop extends EGoods{
    public String name;
    public String id;
    public int price;
    public laptop(){

    }
    public laptop(String name,String id,int price){
        this.name = name;
        this.id = id;
        this.price = price;
    }

    @Override
    public String getName() {
        System.out.println("调用laptop的getName方法");
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getId() {
        System.out.println("调用laptop的getId方法");
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    @Override
    public int getPrice() {
        System.out.println("调用laptop的getPrice方法");
        return price;
    }

    @Override
    public void setPrice(int price) {
        this.price = price;
    }
}
